<template>
    <div class="section-container">
        <div class="logo-section">
            <div class="btn-bar">
                <span class="btn">contact</span>
                <span class="btn">privacy</span>
                <span class="btn">legal</span>
            </div>
            <img class="logo" src="@/assets/imgs/logo.png" />
            <div class="login-bar">
                <img @click="btnAction('link1')" class="icon" src="@/assets/imgs/link_icon1.png" />
                <img @click="btnAction('link2')" class="icon" src="@/assets/imgs/link_icon2.png" />
                <img @click="btnAction('link3')" class="icon" src="@/assets/imgs/link_icon3.png" />
                <span v-show="emailShow" class="email">{{ props.email }}</span>
            </div>
        </div>
        <span class="desc">©2011-2024 ZADARA, INC.</span>
    </div>
</template>

<script setup>
import {ref} from 'vue'
const emits = defineEmits(['btnTap'])
const props = defineProps({
    email: {
        type: String,
        default: ''
    }
})
const btnAction = (type) => {
    emits('btnTap', type)
    if (type == 'link3') {
        emailShow.value = !emailShow.value
    }
}
const emailShow = ref(false)
</script>

<style lang="scss" scoped>
.section-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 40px 0;
    background-color: #000;
    position: relative;

    .logo-section {
       text-align: center;

        .btn-bar {
            margin-right: 300px;

            .btn {
                color: #000;
                margin-right: 20px;
            }
        }

        .login-bar {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            position: absolute;
            top: 60px;
            right: 200px;
            width: 250px;

            .icon {
                width: 30px;
                height: 30px;
                margin-left: 20px;
                cursor: pointer;
            }

            .email {
                color: #fff;
                margin-left: 20px;
            }
        }
    }

    .logo {
        width: 136px;
        height: 32px;
    }

    .desc {
        color: #fff;
        font-size: 14px;
        margin-top: 150px;
    }

}
</style>